@import '../../common.less';

.deploy-log-table {
  padding: 0;
  background: transparent;
  min-height: calc(100vh - 200px);

  // 部署日志 Modal 样式
  .deploy-log-modal-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 4px 0;
    max-height: 400px;
    overflow-y: auto;

    // 自定义滚动条
    &::-webkit-scrollbar {
      width: 6px;
    }

    &::-webkit-scrollbar-track {
      background: rgba(255, 255, 255, 0.1);
      border-radius: 3px;
    }

    &::-webkit-scrollbar-thumb {
      background: rgba(255, 255, 255, 0.3);
      border-radius: 3px;

      &:hover {
        background: rgba(255, 255, 255, 0.5);
      }
    }

    .deploy-log-modal-line {
      display: flex;
      align-items: flex-start;
      gap: 12px;
      padding: 12px 16px;
      border-radius: 6px;
      transition: all 0.2s ease;
      line-height: 1.8;
      border-left: 3px solid transparent;

      &:hover {
        background: #f5f7fa;
        border-left-color: #1890ff;
      }

      .deploy-log-modal-bullet {
        color: #1890ff;
        font-weight: bold;
        flex-shrink: 0;
        margin-top: 4px;
        font-size: 16px;
      }

      .deploy-log-modal-text {
        color: #262626;
        font-size: 14px;
        word-break: break-word;
        flex: 1;
        line-height: 1.8;
      }
    }
  }

  .filter-bar {
    padding: 24px;
    background: #fff;
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);

    .ant-space {
      width: 100%;
    }

    .ant-input,
    .ant-picker,
    .ant-select {
      border-radius: 6px;
      transition: all 0.3s ease;

      &:hover {
        border-color: #40a9ff;
      }

      &:focus,
      &.ant-input-focused,
      &.ant-picker-focused,
      &.ant-select-focused {
        border-color: #1890ff;
        box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
      }
    }

    .ant-btn {
      border-radius: 6px;
      font-weight: 500;
      transition: all 0.3s ease;

      &:hover {
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
      }

      &:active {
        transform: translateY(0);
      }
    }
  }

  .ant-table-wrapper {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    overflow: hidden;

    .ant-table {
      font-size: 14px;

      .ant-table-thead > tr > th {
        background: #fafafa;
        color: #262626;
        font-weight: 600;
        border-bottom: 2px solid #f0f0f0;
        padding: 14px 16px;
        transition: background 0.3s ease;

        &:hover {
          background: #f5f5f5;
        }
      }

      .ant-table-tbody > tr {
        transition: all 0.2s ease;

        &.hover-row:hover {
          background: #f0f7ff;
          box-shadow: 0 2px 4px rgba(24, 144, 255, 0.08);
          transform: translateY(-1px);
        }

        > td {
          padding: 12px 16px;
          border-bottom: 1px solid #f0f0f0;
        }
      }

      .ant-table-cell {
        .ant-btn-link {
          transition: all 0.2s ease;

          &:hover {
            text-decoration: underline;
            color: #096dd9;
          }
        }

        .ant-tag {
          border-radius: 4px;
          font-weight: 500;
          padding: 2px 8px;
          border: none;
          transition: all 0.2s ease;

          &:hover {
            transform: scale(1.05);
          }
        }
      }
    }

    .ant-pagination {
      margin: 20px 0;
      padding: 0 16px;

      .ant-pagination-item,
      .ant-pagination-prev,
      .ant-pagination-next {
        border-radius: 6px;
        transition: all 0.2s ease;

        &:hover {
          border-color: #1890ff;
          transform: translateY(-1px);
        }
      }

      .ant-pagination-item-active {
        background: #1890ff;
        border-color: #1890ff;
        font-weight: 600;

        a {
          color: #fff;
        }

        &:hover {
          background: #40a9ff;
          border-color: #40a9ff;
        }
      }

      .ant-pagination-options {
        .ant-select {
          .ant-select-selector {
            border-radius: 6px;
          }
        }
      }
    }
  }

  .ant-empty {
    .ant-empty-image {
      height: 120px;
      margin-bottom: 16px;
    }

    .ant-empty-description {
      color: #8c8c8c;
      font-size: 14px;
    }
  }
}

// 响应式设计
@media (max-width: 1200px) {
  .deploy-log-table {
    .filter-bar {
      .ant-space {
        .ant-input,
        .ant-picker {
          width: 100% !important;
        }
      }
    }
  }
}

@media (max-width: 768px) {
  .deploy-log-table {
    padding: 8px;

    .filter-bar {
      padding: 12px;

      .ant-space {
        gap: 8px !important;
      }
    }

    .ant-table-wrapper {
      .ant-table {
        font-size: 12px;

        .ant-table-thead > tr > th,
        .ant-table-tbody > tr > td {
          padding: 8px 12px;
        }
      }
    }
  }
}
